package com.pi.pro.xcmg.am.was.edi.led.dto;

import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author shenzq
 */
@Data
public class LedTaskInfo extends ConntectionLedData{
    private String containerCode;
    private String inOutType;
    /**
     * 起始地址编码
     */
    private String srcLocationCode;
    /**
     * 目标地址编码
     */
    private String targetLocationCode;
    private String taskNo;
    private List<LedItemDetail> detailList;

    public String toString(){
        StringBuffer buf = new StringBuffer();
        buf.append("{");
        //
        buf.append("ip:");
        if (this.ip != null) {
            buf.append(this.ip);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("port:");
        buf.append(String.valueOf(this.port));
        buf.append(",");
        //
        buf.append("containerCode:");
        if (this.containerCode != null) {
            buf.append(this.containerCode);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("inOutType:");
        if (this.inOutType != null) {
            buf.append(this.inOutType);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("srcLocationCode:");
        if (this.srcLocationCode != null) {
            buf.append(this.srcLocationCode);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("targetLocationCode:");
        if (this.targetLocationCode != null) {
            buf.append(this.targetLocationCode);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("taskNo:");
        if (this.taskNo != null) {
            buf.append(this.taskNo);
        } else {
            buf.append("");
        }
        buf.append(",");
        //
        buf.append("detailList:");
        buf.append("[");
        if ((this.detailList!=null) && (this.detailList.size()>0)){
            for (LedItemDetail d:this.detailList){
                if (d==null){
                    continue;
                }
                buf.append(d).append(",");
            }
        }
        buf.append("]");
        buf.append("");
        buf.append("}");
        return buf.toString();
    }

}
